@use './var.css';
@use './FormCreate/index.scss';
@use './theme.scss';
@use 'element-plus/theme-chalk/dark/css-vars.css';

.reset-margin [class*='el-icon'] + span {
  margin-left: 2px !important;
}

// 解决抽屉弹出时，body宽度变化的问题
.el-popup-parent--hidden {
  width: 100% !important;
}

// 解决表格内容超过表格总宽度后，横向滚动条前端顶不到表格边缘的问题
.el-scrollbar__bar {
  display: flex;
  justify-content: flex-start;
}

/* nprogress 适配 element-plus 的主题色 */
#nprogress {
  & .bar {
    background-color: var(--el-color-primary) !important;
  }

  & .peg {
    box-shadow:
      0 0 10px var(--el-color-primary),
      0 0 5px var(--el-color-primary) !important;
  }

  & .spinner-icon {
    border-top-color: var(--el-color-primary);
    border-left-color: var(--el-color-primary);
  }
}

.operate-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

// 确认提示框样式
.el-message-box {
  background: linear-gradient(to bottom, #ccd4f4 0%, #eef0fb 30%, #fff 50%, #f5faff 100%);

  .el-button--default {
    background-color: #e8eaf9;
    border-color: #e8eaf9;
  }

  .el-button--primary {
    background-color: #5147ff;
    border-color: #5147ff;
  }

  .el-message-box-icon--warning {
    color: #ff5152;
  }
}

// 成功提示框样式
.el-message--success {
  background: linear-gradient(to bottom, #d2f1dd 0%, #ffffff 100%);
  border: 1px solid #00a838;

  .el-message__content,
  .el-message-icon--success {
    color: #00a838;
  }
}

// 错误提示框样式
.el-message--error {
  background: linear-gradient(to bottom, #ffc4c4 0%, #ffffff 100%);
  border: 1px solid #ff7071;

  .el-message__content,
  .el-message-icon--error {
    color: #ff5152;
  }
}

// 警告提示框样式
.el-message--warning {
  background: linear-gradient(to bottom, rgb(243, 209, 158) 0%, #ffffff 100%);
  border: 1px solid rgb(238, 190, 119);

  .el-message__content,
  .el-message-icon--error {
    color: #e6a23c;
  }
}
